// Copyright (C) ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
//
// $Id: boost_filesystem.hpp 316 2009-01-08 18:01:10Z heavyzheng $
//

#ifndef ZZHENG_UTILITY_BOOST_FILESYSTEM_HPP_20090108__
#define ZZHENG_UTILITY_BOOST_FILESYSTEM_HPP_20090108__

#include <zzheng/config.hpp>

#include <boost/version.hpp>

#ifdef ZZHENG_MSVC
#  pragma warning(push)
#  pragma warning(disable: 4245)
#endif // ZZHENG_MSVC

#if (BOOST_VERSION >= 103400)
#  include <boost/filesystem.hpp>
#else
#  include <boost/filesystem/path.hpp>
#  include <boost/filesystem/convenience.hpp>
#  include <boost/filesystem/exception.hpp>
#endif // (BOOST_VERSION >= 103400)

#ifdef ZZHENG_MSVC
#  pragma warning(pop)
#endif // ZZHENG_MSVC

#include <string>

namespace zzheng {

    inline
    boost::filesystem::path make_path(const std::string& path_str) {
        #if (BOOST_VERSION >= 103400)
        return boost::filesystem::path(path_str);
        #else
        return boost::filesystem::path(path_str, boost::filesystem::no_check);
        #endif // (BOOST_VERSION >= 103400)
    }

} // namespace zzheng

#endif // ZZHENG_UTILITY_BOOST_FILESYSTEM_HPP_20090108__



